package com.leadnews.apis.article.fallback;

import com.heima.model.article.dto.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.common.enums.AppHttpCodeEnum;
import com.leadnews.apis.article.IArticleClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * feign接口熔断降级配置
 */
@Component
@Slf4j
public class IArtcleCilentFallback implements IArticleClient {

    @Override
    public ResponseResult saveArticle(ArticleDto dto) {
        log.error("保存数据失败");
        return ResponseResult.errorResult(AppHttpCodeEnum.SERVER_ERROR,"保存数据失败");
    }
}
